# @summary A short summary of the purpose of this class
#
# A description of what this class does
#
# @example
#   include lzu::ipv6::config
class lzu::ipv6::config {
  augeas{"IPV6INIT" :
    context => "/files/etc/sysconfig/network-scripts/ifcfg-${facts['networking']['primary']}/",
    changes => "set IPV6INIT yes",
  } 
  augeas{"IPV6_AUTOCONF" :
    context => "/files/etc/sysconfig/network-scripts/ifcfg-${facts['networking']['primary']}/",
    changes => "set IPV6_AUTOCONF no",
  }
  augeas{"IPV6_DEFROUTE" :
    context => "/files/etc/sysconfig/network-scripts/ifcfg-${facts['networking']['primary']}/",
    changes => "set IPV6_DEFROUTE yes",
  }
  augeas{"IPV6_FAILURE_FATAL" :
    context => "/files/etc/sysconfig/network-scripts/ifcfg-${facts['networking']['primary']}/",
    changes => "set IPV6_FAILURE_FATAL no",
  }
  augeas{"IPV6ADDR" :
    context => "/files/etc/sysconfig/network-scripts/ifcfg-${facts['networking']['primary']}/",
    changes => "set IPV6ADDR $lzu::ipv6::ipv6addr",
  }
  augeas{"IPV6_DEFAULTGW" :
    context => "/files/etc/sysconfig/network-scripts/ifcfg-${facts['networking']['primary']}/",
    changes => "set  IPV6_DEFAULTGW $lzu::ipv6::ipv6_defaultgw",
  }
  augeas{"ipv6_method" :
    context => "/files/etc/NetworkManager/system-connections/eno1np0.nmconnection/ipv6/",
    changes => "set method manual",
  }
  augeas{"ipv6_address1" :
    context => "/files/etc/NetworkManager/system-connections/eno1np0.nmconnection/ipv6/",
    changes => "set address1 ${lzu::ipv6::ipv6addr},${lzu::ipv6::ipv6_defaultgw}",
  }
}
